package lab02.Test11;

/**
 * Created by mac on 2017/10/25.
 */
public class Rectangle implements Printx {

    //属性

    double longth;
    double width;
    double area(){
        return longth*width;
    }
    double perimeter(){
        return (longth+width)*2;
    }

    //行为

    public void PrintMyWay() {
        System.out.println(longth);
        System.out.println(width);
        System.out.println(area());
        System.out.println(perimeter());

    }

    @Override
    public String PrintMyway() {
        return null;
    }
}